<template>
  <ul class="todo-main">
    <MyItem v-for="(todo, index) in todos" :key="todo.id"
            :todo="todo"
            :check-todo="checkTodo"
            :delete-todo="deleteTodo"
    />
  </ul>
</template>
<script>
import MyItem from "@/components/MyList/MyItem/index.vue";

export default {
  name: 'MyList',
  components: {MyItem},
  props: {
    todos: {
      type: Array,
      default: [],
    },
    checkTodo: {
      type: Function
    },
    deleteTodo: {
      type: Function
    }
  },
  data() {
    return {}
  }
}
</script>


<style scoped lang="css">
/*main*/
.todo-main {
  margin-left: 0px;
  border: 1px solid #ddd;
  border-radius: 2px;
  padding: 0px;
}

.todo-empty {
  height: 40px;
  line-height: 40px;
  border: 1px solid #ddd;
  border-radius: 2px;
  padding-left: 5px;
  margin-top: 10px;
}
</style>